package com.zlink.springcloud.service;

import com.zlink.springcloud.entities.CommonResult;
import com.zlink.springcloud.entities.Payment;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author:Clarence
 * @date 2022/2/25 17:52
 * @motto Practice is the sole criterion for testing truth.
 */
@Component
@FeignClient(value = "CLOUD-PAYMENT-SERVICE")
public interface  PaymentFeignService {

    @GetMapping(value = "/payment/get/{id}")
    public CommonResult<Payment> getPaymentById(@PathVariable("id") Long id);


    @GetMapping(value = "/payment/feign/timeout")
    public String paymentFeignTimeout();
}
